The practice of subnetting provides a simple way to reduce the total number of network numbers that are assigned. The idea is to take a single IP network number and allocate the IP addresses associated with that network number to several physical networks, which are now referred to as subnets. From outside a network of subnets, all that is needed to reach any subnet in the network, is knowledge of where the network of subnets connects to the rest of the Internet. This is often a single point, so a single entry in a switch table will suffice to forward data to any device in the network.
The mechanism by which a single network number can be shared among multiple networks involves configuring all the nodes on each subnet with a subnet mask. With simple IP addresses, all hosts (i.e. devices) on the same network must have the same network number. The subnet mask enables one to introduce a subnet number. All hosts on the same physical network have the same subnet number, which means that hosts on different physical networks (i.e. subnets) may share a single network number.
The subnet mask effectively introduces another level of hierarchy into the IP address. For example, consider the case in which a single class B address is to be shared among several physical networks. A class B address has a mask of 255.255.0.0. If the mask 255.255.255.0 is used for the single class B address, the top 24 bits (where the mask has 1 s) is now defined to be the network number, and the lower 8 bits (where the mask has 0 s) is the host number. Since the top 16 bits identify the network in a class B address, the single class B address that is shared among several physical networks may now be viewed as having not two parts but three: a network part (top 16 bits), a subnet part (next 8 bits), and a host part (last 8 bits). This structure is shown in FIG. 1.
What subnetting means to a host is that it is now configured with both an IP address and a subnet mask for the subnet to which it is attached. For example, consider a host H1 in a subnet that is configured with an address of 128.96.34.15 and a subnet mask of 255.255.255.128. All hosts on the same subnet are configured with the same mask. That is, there is exactly one subnet mask per subnet. The bitwise AND of these two numbers defines the subnet number of the host and of all other hosts on the same subnet. In this case, 129.96.34.15 AND 255.255.255.128 equals 128.96.34.0, so this is the subnet number for the topmost subnet.
When the host wants to send a packet to a certain IP address, the first thing it does is to perform a bitwise AND between its own subnet mask and the destination IP address. If the result equals the subnet number of the sending host, then it knows that the destination host is on the same subnet and the packet can be delivered directly over the subnet. If the results are not equal, the packet needs to be sent to a router to be forwarded to another subnet. Consider H1, having the address 128.96.34.15 and the subnet mask 255.255.255.128, and H2 having the address 128.96.34.139. If H1 is sending to H2, then H1 ANDs its subnet mask (255.255.255.128) with the address for H2 (129.96.34.139) to obtain 128.96.34.128. This does not match the subnet number for H1 (128.96.34.0) so H1 knows that H2 is on a different subnet. Since H1 cannot deliver the packet to H2 directly over the subnet, it sends the packet to its default switch instead. More information on networks is available from numerous references, such as Peterson and Davie, Computer Networks, A Systems Approach, Morgan Kaufmann Publishers, Inc., 1996.
In a normal network topology, routes are used to direct traffic for particular networks to particular interfaces. As used herein, the term interface refers to a network segment. For example, the current routing topology for an unconfigured gateway may have the form shown in Table 1.
TABLE 1Routing table for an unconfigured gatewayNetworkMaskGatewayInterface 0.0.0.0000.000.000.00010.9.1.2dsl010.6.1.0255.255.255.00010.6.1.2eth010.7.1.0255.255.255.00010.7.1.2eopp010.8.1.0255.255.255.00010.8.1.2usb0
This routing table sets up three distinct subnets, that of 10.6.1.*, 10.7.1.*, and 10.8.1.*, each connected through a particular physical interface (ds10, eth0, eopp0, sub0) which has a gateway address within that particular subnet. For example, eth0 has the gateway address of 10.6.1.2, which is numerically part of the 10.6.1.* network.
The three routes defined in the routing table described in Table 1 are considered “network routes” because the bitwise mask is not all ones. The operation to determine a route for an IP address uses the mask and the network to determine which route to follow. For example, if we have a packet with the IP address 10.7.1.4 and are trying to determine which gateway to send the packets, the routing process would look like this:    1 For each route in routing Table 1:    2 if (network AND mask)=(targetIP AND mask) then {    3 send the packet to that gateway and leave the loop }Using this algorithm, packets with the IP address of 10.7.1.4 will be sent to the eopp0 interface with the gateway IP address of 10.7.1.2. Table 1 could represent an unconfigured routing table found in a modern home computer network connected to the Internet by a DSL.
One disadvantage of the myriad of different methodologies used to interconnect devices in a network is apparent when changes to a subnet are made. When a user moves a device, such as a computer, from one interface to another interface within a network, the user must call customer support. This call is necessary because each device is associated with a particular interface in prior art systems. Thus, the system administrator must manually reassign the device from the old interface to the new interface.
A number of approaches have been taken to improve the flow of data across a network. In one known approach Oliver et al. (U.S. Pat. No. 5,491,694) formats data using a specialized format termed the Canonical Frame Format and routes data using a “virtual connection” technique. However, the drawback of Oliver et al. is that it requires the use of specialized data formats, it requires the creation of specialized look-up tables, and altogether fails to address the problem of providing a method and apparatus for moving a device from one subnet to another subnet without the need to call customer support to change the interface.
In another approach Dobbins et al. (U.S. Pat. No. 5,751,971 and U.S. Pat. No. 5,790,546) disclose an apparatus and method wherein multiple router interfaces are assigned the same IP network address, creating an IP work group. This apparatus allows a host to be relocated anywhere in the work group without requiring reconfiguration of the host. Furthermore, Dobbins et al. discloses a technique for using an Address Resolution Protocol (ARP) request so that a host on one interface (first host) may locate a host on another interface (second host). The drawback with Dobbins et al. is that Dobbins requires packets to completely traverse the IP stack twice (once up, once down) before they are routed out the correct interface. This provides a burden on LAN cross-segment traffic. Furthermore, the techniques of Dobbins et al. age out, causing deferral of IP packets in caches, as well as a repeated need to send out broadcast ARP requests in order to determine the IP address of the second host.
In the approach of Patrick et al. (U.S. Pat. No. 5,790,541), an intermediate network packet architecture is implemented in order to conserve valuable IP addresses. The approach of Patrick et al. minimizes the need for IP numbers. However, Patrick et al. does not address the above-identified needs found in the art, including the need to provide a method and apparatus that allows for a device to be moved from one subnet to another subnet without the need to make a customer service call in order to manually reconfigure the network so that the device is recognized on the new subnet.
Vig et al. (U.S. Pat. No. 6,115,385) disclose a method of creating a large flat IP network by adjusting subnet masks of hosts such that these hosts can communicate directly with other hosts without the use of an intermediate router. However, the invention is based on the idea that subnets can be implemented in layer-2 LAN switches. Although this principle is useful within the context provided by Vig et al., it does not address the above-identified problems found in prior art networking systems.
Given the above background, what is needed in the art is a method to facilitate communication between devices in networks and subnetworks in a seamless manner so that devices may be moved from one location in a network to another location in the network without the numerous configuration problems found in prior art systems.